import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () =>import('../views/home/Home')//首页
const imgDown = () =>import('../views/imgDown/imgDown')//你的足迹
const Chat = () =>import('../views/chat/Chat')//碎言碎语
const Life = () =>import('../views/life/life')//慢生活
const Message = () =>import('../views/message/Message')//留言板

const imgForm = () =>import('../views/imgDown/imgFrom/imgForm')//留下你的足迹
const chatForm = () =>import('../views/chat/chatForm/chatForm')//碎言碎语留言
const messageForm = () =>import('../views/message/messageForm/mForm')//留言

Vue.use(VueRouter)

  const routes = [
    {
      path: '',
      redirect: '/home',
    },
    {
      path: '/home',
      component: Home,
      meta:{
        title:'关于我'
      }
    },
    {
      path:'/imgDown',
      component:imgDown,
      meta:{
        title:'你的足迹'
      }
    },
    {
      path:'/chat',
      component:Chat,
      meta:{
        title:'碎言碎语'
      }
    },
    {
      path:'/life',
      component:Life,
      meta:{
        title:'慢生活'
      }
    },
    {
      path:'/message',
      component:Message,
      meta:{
        title:'留言板'
      }
    },
    {
      path:'/imgDown/imgForm',
      component:imgForm,
      meta:{
        title:'留下你的足迹'
      }
    },
    {
      path:'/chat/cahtForm',
      component:chatForm,
      meta:{
        title:'留下你难忘的一刻'
      }
    },
    {
      path:'/message/messageForm',
      component:messageForm,
      meta:{
        title:'留言'
      }
    }
    

    
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})


export default router


